.class Lcom/wmr/order/PingActivity$5;
.super Ljava/lang/Thread;
.source "PingActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/wmr/order/PingActivity;->getpinglist()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/wmr/order/PingActivity;


# direct methods
.method constructor <init>(Lcom/wmr/order/PingActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    .line 241
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 15

    .prologue
    .line 243
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 245
    new-instance v6, Landroid/os/Message;

    invoke-direct {v6}, Landroid/os/Message;-><init>()V

    .line 247
    .local v6, "msg":Landroid/os/Message;
    iget-object v12, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    const-string v13, "userInfo"

    .line 248
    const/4 v14, 0x0

    .line 247
    invoke-virtual {v12, v13, v14}, Lcom/wmr/order/PingActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v7

    .line 249
    .local v7, "preferences":Landroid/content/SharedPreferences;
    const-string v12, "uid"

    const-string v13, ""

    invoke-interface {v7, v12, v13}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    .line 250
    .local v10, "uid":Ljava/lang/String;
    const-string v12, "pass"

    const-string v13, ""

    invoke-interface {v7, v12, v13}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 251
    .local v8, "pwd":Ljava/lang/String;
    new-instance v12, Ljava/lang/StringBuilder;

    iget-object v13, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    iget-object v13, v13, Lcom/wmr/order/PingActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v13}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v13

    invoke-static {v13}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v13

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v13, "/index.php?ctrl=app&action=neworderpinglist&orderid="

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    iget-object v13, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    # getter for: Lcom/wmr/order/PingActivity;->orderid:Ljava/lang/String;
    invoke-static {v13}, Lcom/wmr/order/PingActivity;->access$8(Lcom/wmr/order/PingActivity;)Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    const-string v13, "&uid="

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    const-string v13, "&pwd="

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    const-string v13, "&datatype=json"

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    .line 252
    .local v11, "url":Ljava/lang/String;
    const-string v12, "PingACtivity"

    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "getShopSource \u83b7\u53d6\u8bc4\u4ef7\u5217\u8868"

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v13, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-static {v12, v13}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 253
    iget-object v12, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    iget-object v12, v12, Lcom/wmr/order/PingActivity;->m:Lmyapp/MyApp;

    invoke-static {v11, v12}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v9

    .line 256
    .local v9, "str":Ljava/lang/String;
    :try_start_0
    new-instance v5, Lorg/json/JSONObject;

    invoke-direct {v5, v9}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 258
    .local v5, "json":Lorg/json/JSONObject;
    const-string v12, "error"

    invoke-virtual {v5, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    const-string v13, "true"

    invoke-virtual {v12, v13}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v12

    if-eqz v12, :cond_0

    .line 260
    const-string v12, "msg"

    invoke-virtual {v5, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    iput-object v12, v6, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 261
    const/4 v12, 0x1

    iput v12, v6, Landroid/os/Message;->arg1:I

    .line 262
    iget-object v12, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    iget-object v12, v12, Lcom/wmr/order/PingActivity;->h:Landroid/os/Handler;

    invoke-virtual {v12, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 303
    .end local v5    # "json":Lorg/json/JSONObject;
    :goto_0
    return-void

    .line 265
    .restart local v5    # "json":Lorg/json/JSONObject;
    :cond_0
    const-string v12, "msg"

    invoke-virtual {v5, v12}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v12

    if-eqz v12, :cond_1

    .line 266
    const/4 v12, 0x2

    iput v12, v6, Landroid/os/Message;->arg1:I

    .line 267
    iget-object v12, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    iget-object v12, v12, Lcom/wmr/order/PingActivity;->h:Landroid/os/Handler;

    invoke-virtual {v12, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 296
    .end local v5    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v2

    .line 298
    .local v2, "e":Lorg/json/JSONException;
    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    .line 299
    const-string v12, "\u6570\u636e\u83b7\u53d6\u5931\u8d25"

    iput-object v12, v6, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 300
    const/4 v12, 0x2

    iput v12, v6, Landroid/os/Message;->arg1:I

    .line 301
    iget-object v12, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    iget-object v12, v12, Lcom/wmr/order/PingActivity;->h:Landroid/os/Handler;

    invoke-virtual {v12, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 270
    .end local v2    # "e":Lorg/json/JSONException;
    .restart local v5    # "json":Lorg/json/JSONObject;
    :cond_1
    :try_start_1
    const-string v12, "msg"

    invoke-virtual {v5, v12}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v4

    .line 271
    .local v4, "jarray":Lorg/json/JSONArray;
    invoke-virtual {v4}, Lorg/json/JSONArray;->length()I

    move-result v12

    const/4 v13, 0x1

    if-ge v12, v13, :cond_2

    .line 272
    const/4 v12, 0x2

    iput v12, v6, Landroid/os/Message;->arg1:I

    .line 273
    const-string v12, "\u65e0\u5f85\u8bc4\u4ef7\u6570\u636e"

    iput-object v12, v6, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 274
    iget-object v12, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    iget-object v12, v12, Lcom/wmr/order/PingActivity;->h:Landroid/os/Handler;

    invoke-virtual {v12, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 278
    :cond_2
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_1
    invoke-virtual {v4}, Lorg/json/JSONArray;->length()I

    move-result v12

    if-lt v3, v12, :cond_3

    .line 294
    const/4 v12, 0x3

    iput v12, v6, Landroid/os/Message;->arg1:I

    .line 295
    iget-object v12, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    iget-object v12, v12, Lcom/wmr/order/PingActivity;->h:Landroid/os/Handler;

    invoke-virtual {v12, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 279
    :cond_3
    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 280
    .local v1, "c":Ljava/lang/String;
    new-instance v0, Lbean/OrderParticular;

    invoke-direct {v0}, Lbean/OrderParticular;-><init>()V
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    .line 283
    .local v0, "bb":Lbean/OrderParticular;
    :try_start_2
    invoke-static {v0, v1}, LPlugclass/JsonHelper;->toJavaBean(Ljava/lang/Object;Ljava/lang/String;)V

    .line 285
    iget-object v12, p0, Lcom/wmr/order/PingActivity$5;->this$0:Lcom/wmr/order/PingActivity;

    # getter for: Lcom/wmr/order/PingActivity;->orderParticulars:Ljava/util/ArrayList;
    invoke-static {v12}, Lcom/wmr/order/PingActivity;->access$1(Lcom/wmr/order/PingActivity;)Ljava/util/ArrayList;

    move-result-object v12

    invoke-virtual {v12, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_2
    .catch Ljava/text/ParseException; {:try_start_2 .. :try_end_2} :catch_1
    .catch Lorg/json/JSONException; {:try_start_2 .. :try_end_2} :catch_0

    .line 278
    :goto_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_1

    .line 286
    :catch_1
    move-exception v2

    .line 288
    .local v2, "e":Ljava/text/ParseException;
    :try_start_3
    invoke-virtual {v2}, Ljava/text/ParseException;->printStackTrace()V
    :try_end_3
    .catch Lorg/json/JSONException; {:try_start_3 .. :try_end_3} :catch_0

    goto :goto_2
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 305
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 306
    monitor-exit p0

    return-void

    .line 305
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
